<?php
declare (strict_types = 1);

namespace app\common\command;

use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use think\facade\Cache;
use app\common\service\Redis as RedisServer;
class Store extends Command
{
    protected function configure()
    {
        // 指令配置
        $this->setName('store')
            ->setDescription('the store command');
    }

    protected function execute(Input $input, Output $output)
    {
        $this->store =  app('app\common\model\mall\Store');
        $this->setkey();
        // 指令输出
        //$output->writeln($name);
    }

    public function setKey(){
        $redis = RedisServer::instance(2);

        $redis->rpush('RmtStore',$redis->Lpop('RmtStore'));
        $redis->rpush('RmtStoreOrder',$redis->Lpop('RmtStoreOrder'));
        $redis->rpush('RmtStoreOrder17',$redis->Lpop('RmtStoreOrder17'));
        $redis->rpush('RmtStoreOrder1',$redis->Lpop('RmtStoreOrder1'));
        $redis->rpush('RmtStoreOrder16',$redis->Lpop('RmtStoreOrder16'));
    }


}
